package com.windy.myvideo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.windy.player.IjkVideoView;

import tv.danmaku.ijk.media.player.IjkMediaPlayer;

/**
 * Created by dingfeng on 2016/9/8.
 */
public class OriginPlayerActivity extends AppCompatActivity {

    String url = "/sdcard/shark.mp4";
//    String url = "/sdcard/bjn_mm.mp4";

    private IjkMediaPlayer mMediaPlayer;
    private IjkVideoView mVideoView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_origin_player);
        mVideoView = (IjkVideoView) findViewById(R.id.videoView);
        mVideoView.setVideoPath(url);

        findViewById(R.id.btnPlay).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mVideoView.start();
            }
        });
    }

}
